package leecode

func transpose(matrix [][]int) (result [][]int) {
	//求出数组中有几列
	row := len(matrix)
	column := len(matrix[0])
	//第几列
	for i := 0; i < column; i++ {
		//第几行
		temp := make([]int, 0)
		for j := 0; j < row; j++ {
			temp = append(temp, matrix[j][i])
		}
		result = append(result, temp)
	}
	return result
}
